import axios from 'axios';

let base = 'contract';


//#合同列表
export const contractList = params => {         //列表 & 检索根据客户姓名（模糊）
    return axios.post(`${base}/contract/listpage`, params);
};
export const contractInfo = params => {         //详情（回显）
    return axios.post(`${base}/contract/single`, params);
};
export const contractEdit = params => {         //编辑
    return axios.post(`${base}/contract/edit`, params);
};
export const contractAdd = params => {         //新增
    return axios.post(`${base}/contract/add`, params);
};
export const contractRetrieval = params => {         //检索根据销售姓名（模糊）
    return axios.post(`${base}/contract/retrieval`, params);
};
export const contractRemove = params => {         //删除
    return axios.post(`${base}/contract/remove`, params);
};
export const contractExport = params => {         //导出数据
    return axios.post(`${base}/contract/export`, params, {responseType: 'arraybuffer'});
};


//#待审核
export const pendingContractList = params => {         //列表
    return axios.post(`${base}/pending/listpage`, params);
};
export const pendingContractAgree = params => {        //审核通过
    return axios.post(`${base}/pending/agree`, params);
};
export const pendingContractRefuse = params => {       //审核拒绝
    return axios.post(`${base}/pending/refuse`, params);
};
